#include<unordered_map>
#include<vector>
#include<algorithm>
#include<iostream>

#include"graph.hpp"
#include"ktruss.hpp"
using namespace std;

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef pair<int,int> PI;

//参数１：保存图的文件 f3.txt　参数2：k值
//返回结果：搜索名为q节点的k-truss，保存在result文件里面
/* int main(int argc,char **argv){
    if(argc<3){
        cerr<<"wrong arguement";
        return 0;
    }
    string graphfile=argv[1];
    int k=stoi(argv[2]);
    graph g(graphfile);
    VVI edgtruss=get_edge_truss(g);
    //auto res=query_simple_index(g,5,"q",edgtruss);
    auto res=query_tcp_index(g,k,"q",edgtruss);
    cout<<res.size();
    for(int i=0;i<res.size();i++){
        string s="result";
        s+=to_string(i);
        graph tg=g;
        tg.drawedg(res[i]);
        tg.write(s);
    }
    return 0;
}*/

int main(){
  graph g("f3.txt");
  VVI edgtruss=get_edge_truss(g);
  g.drawedg(edgtruss);
  g.write("edgtruss");
}